package com.rose.doorto.footbathdoor.test.service;

import com.rabbitmq.client.Channel;
import com.rose.doorto.footbathdoor.pojo.Order;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

/**
 * @Author 李庆超
 * @email 1481791489@qq.com
 * @Package：com.rose.doorto.footbathdoor.test.service
 * @Project：door-to-door
 * @name：WorkCustomer
 * @date 2024/09/06 2024/9/6:15:52:
 */
@Slf4j
//@Component
public class WorkCustomer {

//    @RabbitListener(bindings = {
//            @QueueBinding(
//                    value = @Queue(value = "doorQueue", declare = "true"), // 创建info队列,declare默认队列持久化
//                    key = {"route.user"}, // 路由key
//                    exchange = @Exchange(type = "direct", name = "doorExchange")
//            )})
    public void receive12211(Order order, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) {
        System.out.println("路由模式message1 = " + order);
    }

}
